package com.gaff.emp.core.util;

import java.rmi.server.UID;
import java.util.UUID;

public class Identities {

    private static final SnowFlake SNOW_FLAKE_GENERATER = new SnowFlake(0L, 0L);

    public Identities() {
    }

    public static long snowFlake() {
        return SNOW_FLAKE_GENERATER.next();
    }

    public static String snowFlakeString() {
        return Long.toString(SNOW_FLAKE_GENERATER.next());
    }

    public static String uuid() {
        return UUID.randomUUID().toString().replaceAll("-", "").toUpperCase();
    }

    public static String uid() {
        return (new UID()).toString().replaceAll(":", "").replaceAll("-", "").toUpperCase();
    }

}
